home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
ctutord.EXE
/
RETURNPT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-16
|
462b
|
41 lines
/* returnpt.c */
main()
{
char *fill();
static char x[][5] = {
"hi",
"bye",
"all",
"done",
"for",
"now!",
"\n"
};
char y[80];
char *z;
z = fill(x,y);
printf("%s \n%s\n", z, y);
}
char *fill(a, b)
char a[][5], *b;
{
int i, j;
for(i=0; a[i][0] != '\n'; i++)
for(j=0; j<5; j++,b++)
if( a[i][j] != 0 )
*b = a[i][j];
else{
*b = ' ';
b++;
break;
}
*b = 0;
return(b);
}